<script language="JavaScript">
	function selectItem(obj) {
		//alert(obj.length);
		try {
			var len = document.frm.scoreitem.length;
			for ( var i = 0; i < len; i++) {
				if (obj.length == 1) {
					if (hasOther(obj, document.frm.scoreitem[i].value)) {
						document.frm.scoreitem[i].checked = true;
					}
				} else {

					if (document.frm.scoreitem[i].value.indexOf(obj + ',') != -1) {
						document.frm.scoreitem[i].checked = true;
					}
				}
			}
		} catch (e) {
		}
	}

	function hasOther(obj1, obj2) {
		var result = false;
		var count = 0;
		var arr2 = obj2.split(',');
		for ( var m = 0; m < arr2.length; m++) {
			if (obj1 == arr2[m]) {
				count++;
			}
		}
		if (count > 0) {
			result = true;
		}
		return result;
	}

	function selectItemCancel(obj) {
		//alert(obj+',');
		try {
			var len = document.frm.scoreitem.length;
			for ( var i = 0; i < len; i++) {
				if (document.frm.scoreitem[i].value.indexOf(obj + ',') != -1) {
					document.frm.scoreitem[i].checked = false;
				}
				if (document.frm.scoreitem[i].value == obj) {
					document.frm.scoreitem[i].checked = false;
				}
			}
		} catch (e) {
		}
	}
	
	function formsubmit(){
		document.getElementById("creatscore").style.display = "inline-block";
	 	document.frm.submit();
	 	document.frm.submit1.disabled=true;
	}
	
</script>
<form action="/project/calculateProjectScore.do" method="post" name="frm">
<table width="90%" style="margin-top:20px;" border="0" align="center" cellpadding="10" cellspacing="0">
	<tr>
		<td>
		<div id="main">
			<h3>选择评分子项</h3>
			<fieldset>
				<table width="100%" border="0" cellpadding="0" cellspacing="0">
					<tr>
						<td width="8%" height="30" align="left">选择评分子项</td>
				    	<td width="92%" align="left">
				    	<input type="hidden" name="projectId" value="$!projectId" />
															$!cateTree
				    	</td>

					</tr>
					
					<tr>
					  <td height="50" align="left" colspan="2">
					 <label>
																<input type="button" name="submit1" value="下一步" onclick="javascript:formsubmit();"/> 
																<span id="creatscore"  style="display: none; color: #FF0000; font-size: 12px">正在生成评分，请稍候</span>  
															</label>
					 </td>

				  </tr>
			</table>
			</fieldset>
		</div>
		</td>
	</tr>
</table>
</form>